package com.cssy.xxkj.logic.web;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;

import com.cssy.base.web.BodyMsg;
import com.cssy.xxkj.logic.service.IFileUploadService;
import com.cssy.xxkj.logic.service.impl.FileUploadServiceImpl;
import com.plat.helper.SearchConditions;

@Controller
@RequestMapping("/logic/fileUplode")
public class FileUplodeController {
	
	private static String INPRICE="/xxkj/logic/upload/toExcelPrice";
	
	@Resource(name = "fileUploadService")
	private IFileUploadService fileUploadService;
	
	@RequestMapping("/toInPrice")
	public String toInPrice(HttpServletRequest request, HttpServletResponse response,Model model){
		model.addAttribute("zd008StepDate", request.getParameter("date"));
		return INPRICE;
	}
	
	@ResponseBody
	@RequestMapping("/inPirce")
	public void inPrice(HttpServletRequest request, HttpServletResponse response){
		String date=request.getParameter("zd008StepDate");
		if(!StringUtils.isEmpty(date)){
			fileUploadService.fileInExcelStore(request);
		}
		
	}
}
